package cn.bone.vertx.demo01;

import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;

import java.util.function.Consumer;

/**
 * Created by MD-01 on 2017/2/9.
 */
public class Runner {

    public static void run(Class clazz){
        VertxOptions options = new VertxOptions();
        Consumer<Vertx> runner = (vertx) -> {
            vertx.deployVerticle(clazz.getName());
        };
        Vertx vertx = Vertx.vertx(options);
        runner.accept(vertx);
    }
}
